#pragma once

#include <typedef.h>

class TaskRun
{
public:
	TaskRun();
	virtual ~TaskRun();
	virtual void Start(void* arg = nullptr);
	virtual void Stop(void);
	virtual bool IsRunning(void);
	static void* PthreadTaskRun(void* arg);
	static void PthreadCreateTask(TaskRun* task);
	static void mSleep(uint32_t ms);

protected:
	virtual void Run(void* arg) = 0;

protected:
	bool m_IsRunning;

private:
	void* m_TaskArg;
};